#ifndef LOCKFREE_QUEUE_H
#define LOCKFREE_QUEUE_H

#include <stdatomic.h>
#include <stdbool.h>
#include "../atomic/atomic.h"

typedef struct node {
    void* data;
    struct node* next;
} node_t;

typedef struct {
    atomic_ptr head;
    atomic_ptr tail;
} queue_t;

void queue_init(queue_t* queue);
bool queue_enqueue(queue_t* queue, void* data);
void* queue_dequeue(queue_t* queue);
bool queue_is_empty(queue_t* queue);

#endif // LOCKFREE_QUEUE_H 